Skip to content

feat(demo): defensible fixtures, and both halves of Drift running on open - #21

Closed
RodolpheKouyoumdjian wants to merge 8 commits into
mainfrom
fix/demo-fixture-accuracy
Closed

RodolpheKouyoumdjian wants to merge 8 commits into
mainfrom
fix/demo-fixture-accuracy

Conversation

@RodolpheKouyoumdjian

Copy link
Copy Markdown
Contributor

Brings the demo repository to the state the landing page's "Try it in your
browser" section depends on.

Fixtures. Earlier commits made every fixture technically defensible — real,
documented breaking changes rather than arguable ones — regenerated DEMO.md
from the BREAKING comments, fixed a comment-parser false match on #, and
provisioned the Rust toolchain at Codespace creation so the panel is not blank
for minutes on first analysis.

Both halves of Drift now start on their own. A Codespace opened from the
landing page has to show Drift working, not a repository with a README about it:

  • the CLI was absent entirely — nothing installed @usedrift/cli, so drift
    was on no demo's PATH. Each container now installs it at creation, which is
    free: every image already has Node for the prepare script.
  • the panel needed a click. drift.ui.openOnStartup reveals it as the window
    opens, before the analysis runs, so the visitor watches the work rather than
    arriving at a finished verdict.
  • postAttachCommand runs drift analyze on the one demo directory, in a real
    terminal, on attach and on resume.

DEMO.md no longer tells the visitor to open the Activity Bar, and says how to
re-run the CLI themselves.

Note: this depends on drift.drift (VS Code Marketplace) and
@usedrift/cli (npm) being published. Until then a Codespace comes up with a
correct fixture and nothing to analyse — silently, since extensions no-ops on
a missing extension. The README and maintainer notes say so.

🤖 Generated with Claude Code

RodolpheKouyoumdjian and others added 8 commits August 29, 2026 15:18
Conan's fmt 9.1->10.2 fixture claimed compile-time format-string checking,
fmt::runtime(), and fmt::join's header move as 9->10 breaks; none of those
are real for that version pair. Replaced with fmt 10.0's actual, documented
removal of implicit enum-to-integer conversions in formatting.

vcpkg's spdlog 1.11->1.14 fixture claimed rotating_logger_mt's max_file_size
changed type (it didn't) and leaned on unverified runtime-format claims.
Replaced the dependency entirely with Catch2 2.13->3.5: the v2 single header
and CATCH_CONFIG_MAIN both genuinely stop working in v3, a boring and
undeniable break.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Drop the implicit expectation that every ecosystem needs 3-5 breaking
examples. One indisputable break beats several arguable ones, so trim the
Hex, OCaml, PHP, and Dart fixtures down to only the breaks that are real and
documented, and update make-demo-docs.mjs's marker/wording to read naturally
for a single break as well as several.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
make-demo-docs.mjs treated any '#'-prefixed line as a comment continuation,
which is right for Python/Ruby/Elixir but swallowed the '#define'/'#include'
lines immediately following the new vcpkg fixture's BREAKING comment into the
generated explanation text. Only treat '#' as a comment marker when it's
followed by whitespace or end of line, then regenerate all 16 DEMO.md files
against the current source.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Drift's Rust surface diff shells out to cargo public-api, which needs the
nightly toolchain to read rustdoc's unstable JSON output. Drift auto-installs
both itself on first analysis (tools.autoInstall defaults to true in the
extension), but cargo-public-api compiles from source, leaving the panel
apparently frozen for several minutes on a visitor's first open. Move that
wait into onCreateCommand instead, where a Codespace build is expected to
take a while.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Replace the README's <ecosystem>-parameterized URL with a generated table
where each demo has its own working https://codespaces.new link, built by a
new scripts/make-readme.mjs from the devcontainers that actually exist so it
can't drift. Also trims the README back to what a visitor needs: what the
repo is, how the demo state works, the table, and the maintenance scripts —
and states plainly that no demo has been smoke-tested in a real Codespace yet.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
browser-demo.md still described the pre-#19 upgrade.patch mechanism and
carried a hand-maintained, five-row Deep-links table left over from before
all 16 demos existed. Point both at what's actually there: demo.json's
find/replace edits, and the generated README table.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Add cheap, no-toolchain assertions: exactly 16 known ecosystems have a demo,
exactly 16 devcontainers exist, each demo.json declares at least one edit,
each demo's source carries at least one BREAKING marker, and the README
launch table is checked alongside the other generated files.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
A Codespace opened from the landing page has to show Drift working, not a
repository with a README about it. Three things were missing.

The CLI was absent entirely: nothing installed `@usedrift/cli`, so `drift` was
not on the PATH in any demo. Each container now installs it at creation, which
is free — every image already has Node for the prepare script.

The panel needed a click. The extension showed a startup notification and
opened only if the visitor found and pressed it. `drift.ui.openOnStartup`
reveals it as the window opens, before the analysis runs, so the visitor
watches the work rather than arriving at a finished verdict.

The CLI needed a terminal. `postAttachCommand` runs `drift analyze` on the one
demo directory, in a real terminal in the editor, on attach and on resume.

DEMO.md no longer tells the visitor to open the Activity Bar, since both halves
are already running, and says how to re-run the CLI themselves.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 9, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@RodolpheKouyoumdjian

Copy link
Copy Markdown
Contributor Author

Superseded by a branch cut from current main. The earlier commits on fix/demo-fixture-accuracy already landed as #20, which left this branch conflicting on history alone — the trees were identical. Reopened as the single new commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants